package com.wanmait.translate.supplier.controller;

import com.github.pagehelper.PageInfo;
import com.wanmait.translate.pojo.SupplierInfo;
import com.wanmait.translate.supplier.service.SupplierInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 阿宇
 * @Description :供应商信息类
 * @Date 16:07 2020/11/3 0003
 */
@Controller
@RequestMapping("/supplier")
public class SupplierInfoController {
    //首页
    @RequestMapping("index")
    public void index(){
    }
    //供应商收集
    @RequestMapping("list")
    public void list(Model model){


    }

    //
    @RequestMapping("info")
    public void info(){
    }

    //
    @RequestMapping("add")
    public void add(){
    }

    //包含的菜单页
    @RequestMapping("menu")
    public void menu(){
    }

    /*
     * @Author guang
     * @Description : 供应商信息
     * @Date 10:38 2020-11-12
     **/
    @Resource
    private SupplierInfoService supplierInfoService;

    @GetMapping("tracking")
    @ModelAttribute("pageInfo")
    @ResponseBody
    public PageInfo<SupplierInfo> tracking(Integer pageNum){
        if (pageNum == null) {
            pageNum = 1;
        }
        return supplierInfoService.findAll(pageNum);
    }
}
